﻿using System;

using System.Collections.Generic;
using System.Text;

namespace Silvermoon.Animations
{
    public class SineEase : EasingFunctionBase
    {

        public static readonly SineEase InOut = new SineEase { Mode = EasingMode.EaseInOut };
        public static readonly SineEase In = new SineEase { Mode = EasingMode.EaseIn };
        public static readonly SineEase Out = new SineEase { Mode = EasingMode.EaseOut };


        protected override float EaseValue(float normalizedTime)
        {
            double t = normalizedTime;
            return (float)(1d - (Math.Sin((1.0d - t) * Math.PI / 2d)));
        }
    }
}
